package com.czj.controller;

import com.czj.dao.StoresDao;
import com.czj.model.Stores;
import com.czj.service.StoresService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StoresController {
    @Autowired
    private StoresService storesService;

    @RequestMapping("/chastores")
    public List<Stores> chastores(){
        return storesService.chastores();
    }
    @RequestMapping("/chastores/chaname")
    public List<Stores> chaname(String name){
        return storesService.chaname(name);
    }

    @RequestMapping("/chastores/chalabel")
    public List<Stores> chalabel(String label){
        return storesService.chalabel(label);
    }
}
